<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改旅游景区信息管理')" />
    <th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-untitled-edit" th:object="${untitled}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">景区名称：</label>
                <div class="col-sm-8">
                    <input name="untitledName" th:field="*{untitledName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">景区详细信息：</label>
                <div class="col-sm-8">
                    <input id="description" name="description" th:field="*{description}" type="hidden" >
                    <div class="summernote"></div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">景区地址：</label>
                <div class="col-sm-8">
                    <input name="address" th:field="*{address}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所在城市：</label>
                <div class="col-sm-8">
                    <input name="city" th:field="*{city}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">省份：</label>
                <div class="col-sm-8">
                    <input name="province" th:field="*{province}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">纬度：</label>
                <div class="col-sm-8">
                    <input name="latitude" th:field="*{latitude}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经度：</label>
                <div class="col-sm-8">
                    <input name="longitude" th:field="*{longitude}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">开放时间描述：</label>
                <div class="col-sm-8">
                    <input name="openingHours" th:field="*{openingHours}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">门票价格：</label>
                <div class="col-sm-8">
                    <input name="ticketPrice" th:field="*{ticketPrice}" class="form-control" type="text">
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "lvyou/untitled";
        $("#form-untitled-edit").validate({
            focusCleanup: true
        });

        $(document).ready(function () {
            $('.summernote').summernote({
                lang: 'zh-CN'
            });
            var content = $("#description").val();
            $('.summernote').summernote('code', content);
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-untitled-edit').serialize());
            }
        }
    </script>
</body>
</html>